package com.ws.ssmzongjie3.service.impl;

import com.ws.ssmzongjie3.bean.Orders;
import com.ws.ssmzongjie3.mapper.OrdersMapper;
import com.ws.ssmzongjie3.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class OrdersServiceImpl implements OrdersService {
    @Autowired
    private OrdersMapper ordersMapper;
    @Override
    public int deleteOrderById(Orders orders) {
        return ordersMapper.deleteOrderById(orders);
    }

    @Override
    public int insertOrder(Orders orders) {
        return ordersMapper.insertOrder(orders);
    }

    @Override
    public Orders getOrderById(Orders orders) {
        return ordersMapper.getOrderById(orders);
    }

    @Override
    public int updateOrderById(Orders orders) {
        return ordersMapper.updateOrderById(orders);
    }

    @Override
    public List<Orders> listOrderByUserId(Orders orders) {
        return ordersMapper.listOrderByUserId(orders);
    }

    @Override
    public List<Orders> listOrderWithRouteAndUser(Orders orders) {
        return ordersMapper.listOrderWithRouteAndUser(orders);
    }
}
